#include "folder.h"

namespace Tubox {

Folder::Folder(const QString& name, const QString& path, const QString& modDate, unsigned int itens)
		: name(name), path(path), modDate(QDateTime::fromString(modDate,Qt::ISODate)), itens(itens) { }


Folder::Folder(QString& pathName, unsigned int itens) : itens(itens) {
	int lastBarPos = pathName.lastIndexOf("/");
	name = pathName.right(pathName.size() - lastBarPos - 1);
	pathName.resize(lastBarPos + 1);
	path = pathName;
}

}

